package com.dmagic.cms.dao;

import org.springframework.stereotype.Component;

import com.dmagic.cms.common.dao.CommonDao;
import com.dmagic.cms.common.query.PageUtil;
import com.dmagic.cms.entity.AppUser;

@Component
public class AppUserDao extends CommonDao<AppUser, Long> {
	public AppUser getAppUserByUserName(String userName) {
		return findUniqueBy("userName", userName);
	}

	public void searchUser(PageUtil<AppUser> pageUtil) throws Exception {
		super.findPage(pageUtil, "from AppUser where isObsoleteDate is null");
	}
}
